Method: YARD::Templates::Section#[]
- Defined in:
- lib/yard/templates/section.rb
#[](*args) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/yard/templates/section.rb', line 20 def [](*args) if args.first.is_a?(Range) || args.size > 1 obj = super(*args) obj.name = name return obj elsif args.first.is_a?(Integer) return super(*args) end find {|o| o.name == args.first } end |